Content tabs group several titled panels of content into one block that
shows a single panel at a time. They suit content that comes in variants
(such as installation steps for each operating system or the same snippet
in several programming languages).
A tabs block consists of:
- A row of tab titles. The title of the panel that is showing
is highlighted.
- The panel of the active tab, below the titles. A panel
can hold any kind of content (including nested tabs blocks).
Inserting a tabs block
- In the formatting bar, go to Insert → Tabs.
- Alternatively, type
/tabs and press Enter, as described
in Slash Commands.
A new block contains two tabs, named “Tab 1” and “Tab 2”. The title of
the first tab is selected, so typing replaces it.
Editing tabs
- To show a tab, click its title or move the cursor into it.
- To move from a title into its panel, press Enter.
- The label of a tab can be formatted just like normal text, including support
for Icons.
While the cursor is inside a tabs block, a toolbar appears above it with
the following buttons:
- (Add tab) inserts
a tab after the current one and selects its title.
- (Remove tab) removes
the current tab. Removing the last tab removes the whole block.
- (Move tab left) and (Move tab right) change
the order of the tabs.
- (Copy link to tab) copies
a link to the current tab, as described below.
The tab that is showing is not saved with the note: every tabs block opens
on its first tab.
Reading tabs
In Read-Only Notes and
on Sharing,
tabs blocks work as tabs as well:
- To show a tab, click its title, or focus it and press Enter or Space.
- To move between the titles of a block, use the arrow keys, Home and End.
A tab without a title shows “Tab title” in place of one.
Linking to a tab
A link can point to a single tab, much like a link to a block (see Block references):
- Place the cursor in the tab, either in its title or in its panel.
- Press Copy link to tab in the toolbar of the tabs block. Alternatively,
right-click the text and select Copy → Copy link to this tab.
The tab flashes briefly.
- Go to the note where to insert the link and press Ctrl+V.
The link shows the title of the note, followed by the title of the tab.
Clicking it opens the note, shows the tab and flashes it. As with any block
reference, the link can be turned into an Include Note that shows only that
tab.
Links to a tab can be copied only from a note being edited. On a shared page,
such a link opens the whole note.
Content in hidden tabs
Content inside a tab that is not showing is still reachable (both while
editing and while reading). The tab that holds it is shown when:
- searching the note with Ctrl+F highlights a match
inside it;
- a link points to an anchor or a block inside it (see Anchors and Block references);
- an entry of the Table of contents or
the Highlights list points
inside it;
- on a shared page, the address of the page points to a heading or an anchor
inside it.
Tab titles are not headings, so they do not appear in the table of contents;
headings inside a panel do.
Printing and exporting
- When printing or exporting to PDF,
every tab is printed, one after another, each with its title above its
panel.
- Markdown export and import write tabs blocks in the content tabs syntax
of Material for MkDocs, described in Supported syntax. Markdown notes
use the same syntax, show the blocks as tabs in their preview and insert
them with
/tabs.
- Anywhere the tabs cannot work as tabs (such as an HTML export opened elsewhere),
a tabs block reads as a sequence of titled sections.